import 'package:get/get.dart';
import 'package:xin_he/page/mine/xin_he_mine_work_space/xin_he_my_studio_entity.dart';

import '../../../service/xin_he_reqest.dart';
import '../../../utils/xin_he_toast.dart';
import 'xin_he_mine_work_space_state.dart';

class XinHeMineWorkSpaceLogic extends GetxController {
  final XinHeMineWorkSpaceState state = XinHeMineWorkSpaceState();
  Rx<XinHeMyStudioEntity> model = XinHeMyStudioEntity().obs;

  @override
  void onInit() {
    // TODO: implement onInit
    super.onInit();
  }

  @override
  void onReady() {
    // TODO: implement onReady
    super.onReady();
    requestData();
  }
  requestData()async{

    Map<String,dynamic> param = {'studioId':'533832881403854848'};
    XinHeRequestDataResult result = await XinHeHttpRequestData.requestUniversalPost(url: '/studio/detailStudio',params: param,isPost: false);

    if(!result.result){
      XinHeToast.center(result.data['message']);
      return ;
    }
    XinHeMyStudioEntity odel = XinHeMyStudioEntity.fromJson(result.data['data']);
    model.value = odel;

  }

}
